package com.hgy.carsb.service;

import com.hgy.carsb.entity.IndicatorDetail;
import com.hgy.carsb.entity.UnitRatioDetail;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SaleDetailService {

    @Autowired
    private MainIndicatorService mainIndicatorService;

    public UnitRatioDetail getSaleDetail(int year, int month, String prefix){
        IndicatorDetail indicatorDetail = mainIndicatorService.getOverlayDetail(year, month, "sale", prefix);
        UnitRatioDetail unitRatioDetail = new UnitRatioDetail(indicatorDetail);
        return unitRatioDetail;
    }
}
